/*  utils.c
 *  Arizona State University
 *  CSE 325: Embedded Systems Programming
 *  Lab 7: Morse Code
 *  Georgii Tkachuk, Brentton Garber
 *   Emails: 	gtkachuk@asu.edu btgarber@asu.edu
 */


void setBit(int number, int pos)
{
	number |= 1 << pos;
}

// Sets the bit at a specific position to 0
void clearBit(int number, int pos)
{
	number &= ~(1 << pos);
}

// returns the bit at a specific position
int getBit(int number, int pos)
{
    return (number & ( 1 << pos )) >> pos;
}